<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/common.css">
    <script src="js/jquery.1.7.2.min.js"></script>
    <title>注册</title>
</head>
<body>
<div class="wxw-heading">
    <span class="wxw-heading-newClass">注册</span>
    <button class="wxw-heading-save">确定</button>
</div>
<div class="wxw-container">
<div class="wxw-container-1">
    <input type="text" class="wxw-container-1-inp" id="real_name" placeholder="您的真实姓名">
</div>
<div class="wxw-container-1">
    <span>性别：</span>
    <select name="" id="sex" style="width:40px;">
        <option value="女">女</option>
        <option value="男">男</option>
    </select>
</div>
</div>
</body>
<script>
    $('.wxw-heading-save').on('click',function(){
        var realName=$("#real_name").val();
        var sex=$("#sex").find("option:selected").text();
        $.post('user/add',{sexRealName:realName,sex:sex},function(){
            location.href="classList";
        })
    })
</script>
</html>